<template>
	<B></B>
</template>

<script setup>
import B from './components/B.vue'
import { provide, ref } from 'vue'
const message = ref('Hello World')
// 将message提供出去，提供给所有的下级组件
provide('msg', message)
const fun = x => {
	console.log('修改message')
	console.log(x)
	message.value = x
}
// 将fun方法提供出去
provide('fun', fun)
</script>

<style scoped>
	
</style>